package com.bwie.controller;

import com.bwie.service.UserService;
import com.bwie.utils.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

/**
 * @Author: tsh
 * @Date: 2025/7/18 19:56
 * @Description: TODO
 **/
@RestController
@RequestMapping("/auth/index")
@Api(tags = "文件服务")
public class FileController {
    @Autowired
    UserService userService;

    @PostMapping("/uploadFile")
    @ApiOperation(value = "上传图片")
    public R uploadFile(@RequestPart("file")MultipartFile file){
        return  userService.uploadFile(file);
    }
}
